﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using l1cs.server.model.Instance;

namespace l1cs.server.serverpackets
{
    public class S_Lawful : ServerBasePacket
    {
        private byte[] _byte = null;

        public S_Lawful( int objid, int lawful )
        {
            buildPacket( objid, lawful );
        }

        private void buildPacket( int objid, int lawful )
        {
            writeC( Opcodes.S_OPCODE_LAWFUL );
            writeD( objid );
            writeH( lawful );
            writeD( 0 );
        }

        override
        public byte[] getContent()
        {
            if ( _byte == null )
            {
                _byte = getBytes();
            }
            return _byte;
        }

        override
        public String getType()
        {
            return "[S] S_Lawful";
        }

    }
}